package com.apache.portal.weixin.core.manager.impl.parser;

import org.jdom.Element;
import org.jdom.JDOMException;

import com.apache.portal.weixin.core.manager.impl.WxRecvMsgBaseParser;
import com.apache.portal.weixin.entity.recv.WxRecvLinkMsg;
import com.apache.portal.weixin.entity.recv.WxRecvMsg;

/**
  * description: 链接消息转换代理接口实现
  * @author Hou DaYu 创建时间：下午05:35:31 
 */
public class WxRecvLinkMsgParser extends WxRecvMsgBaseParser {

	@Override
	protected WxRecvLinkMsg parser(Element root, WxRecvMsg msg) throws JDOMException {

		String title = getElementText(root, "Title");
		String description = getElementText(root, "Description");
		String url = getElementText(root, "Url");
		return new WxRecvLinkMsg(msg, title, description, url);
	}

}
